module.exports = {
  port: "3000",
  dest: "_docs",
  base: "/herosphp/",
  markdown: {
    lineNumbers: false, // 不显示代码行号
    externalLinks: {
      target: '_blank', rel: 'noopener noreferrer'
    },
  },
  plugins: [
    '@vuepress/plugin-back-to-top',
    ['vuepress-plugin-code-copy', { align: 'bottom', color: '#ffffff' }],
    ['container', {
      type: 'motto',
      before: info => `<div class="custom-block motto">${info ? `<p class="custom-block-title">${info}</p>` : ''}`,
      after: '</div>',
      defaultTitle: ''
    }],
    ['container', {
      type: 'info',
      before: info => `<div class="custom-block info">${info ? `<p class="custom-block-title">${info}</p>` : ''}`,
      after: '</div>',
      defaultTitle: ''
    }]
  ],
  locales: {
    "/": {
      lang: "zh-CN",
      title: "HerosPHP 开发手册",
      description: "高性能 PHP Web 开发框架"
    }
  },
  head: [["link", { rel: "icon", href: "/favicon.png" }]],

  themeConfig: {
    logo: "/img/logo.png",
    editLinks: true,
    activeHeaderLinks: true,
    sidebarDepth: 1,
    locales: {
      "/": {
        label: "简体中文",
        selectText: "Languages",
        editLinkText: "在 GitHub 上编辑此页",
        lastUpdated: "上次更新",
        nav: [
          {
            text: "新手指南",
            link: "/guide/"
          },
          {
            text: "基础功能",
            link: "/basic/request.html"
          },
          {
            text: "常用组件",
            link: "/components/orm.html"
          },
          {
            text: "版本更新",
            link: "https://gitee.com/blackfox/herosphp/blob/master/CHANGELOG.md",
          }
        ],
        sidebar: {
          '/guide/': ['', 'quick-start', 'join'],
          '/basic/': ['request', "response", "route", "controller", "view", "ioc", "session", "middleware", "command", "process", "utils", "constants"],
          '/components/': ['orm', 'upload', 'validate', 'crontab', 'event', 'queue', 'rpc', 'phar', 'env', 'phpunit'],
          '/': [""],
        },
      }
    },

  }
}
